<?php 
class ViewModel{
	private $data=array();
	private $render=FALSE;
	public function __construct($template){
		$file=$template.".php";
		if(file_exists($file)){
			$this->render=$file;
		}
	}
	public function assign($variable,$value){
		$this->data[$variable]=$value;
	}
	public function display(){
		$data=$this->data;
		include ($this->render);
	}
}

 ?>